import {HttpClient} from '@angular/common/http';
import {Injectable} from '@angular/core';
import {Observable} from "rxjs/Observable";
import 'rxjs/add/operator/map';

@Injectable()
export class ClientClaimProvider {
    constructor(public http: HttpClient) {
    }

    /**
     * 获取客户理赔列表
     * @param {string} clientCode
     * @returns {Observable<any>}
     */
    getClaimList(clientCode: string): Observable<any> {
        let url = `/policy/v1/clientClaimsList/${clientCode}?not-loading=0`;

        return this.http.get(url).map(item => {
            return item;
        })
    }
}
